package com.atguigu.spzx.common.utils;

import cn.hutool.core.bean.BeanUtil;

import java.util.List;
import java.util.stream.Collectors;

public class BeanUtils extends BeanUtil{
    private BeanUtils() {}

    public static <T> List<T> toBeanList(List<?> sourceList, Class<T> targetClass) {
        return sourceList.stream()
                .map(source -> toBean(source, targetClass))
                .collect(Collectors.toList());
    }
}
